<!--导航栏-->
<div id="nav">
    <div id="container">
        <ul class="left">
            <li><a href="/supply">供应大厅</a></li>
            <li><a href="/purchase">采购大厅</a></li>
            <li><a href="/market">市场行情</a></li>
        </ul>
        <% if (user) { %>
        <div class="right">
            <a href="userInfo" class="userInfo">
                        <img src="<%= user.photo %>" onerror="this.src='upload/default.jpg'">
            </a>
            <a href="/userInfo"><%= user.userName %></a>
            <% if( user.userName == 'admin') {%>
             <a href="/backStage">后台</a>
            <% } %>
            <a href="/logout">退出</a>
            <div class="shoppingCar"></div>
            <div class="carDropDown">
                <span>购物车还没有商品，赶快去选购吧！</span>
            </div>
        </div>

        <% } else { %>
        <div class="right">
            
            <a href="/login" title="登录">登录</a>
            <a href="/reg" title="注册">注册</a>
            <div class="shoppingCar"></div>
            <div class="carDropDown">
                <span>购物车还没有商品，赶快去选购吧！</span>
            </div>
        </div>
        <% } %>
    </div>
</div>
<p style="height: 44px"></p>